<layout name='PublishedRecipe' />
    <div class="center">
    	<div class="dq_weizhi">Current position: Home >> recipes >> dish</div>
    	<div class="left">
        	<div class="Grilled">
            	<div class="zuozhe">
                    <empty name="recipeinfo.userinfo.gravatar">
                        <img width="91" height="91" src="../Public/images/ren.jpg" />
                        <else/>
                        <img width="91" height="91" src="__PUBLIC__/Content/User/<{$recipeinfo.userinfo.gravatar}>" />
                    </empty>
                    <p class="chushimao" title="<{$recipeinfo.userinfo.exp}> integral">
                        <if condition="$recipeinfo['userinfo']['exp'] egt 1500">
                                <img src="../Public/images/jing.jpg" />
                            <elseif condition="$recipeinfo['userinfo']['exp'] egt 800"/>
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                            <elseif condition="$recipeinfo['userinfo']['exp'] egt 300"/>
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                            <elseif condition="$recipeinfo['userinfo']['exp'] egt 100"/>
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                            <elseif condition="$recipeinfo['userinfo']['exp'] egt 25"/>
                                <img src="../Public/images/chushimao.jpg" />
                                <img src="../Public/images/chushimao.jpg" />
                            <else />
                                 <img src="../Public/images/chushimao.jpg" />
                        </if>
                    </p>
                </div>

                <div class="gr_right">
                	<h1><{$recipeinfo.name}></h1>
                    <p>Author: <{$recipeinfo.userinfo.username}> / <{$recipeinfo.created|date="m-d-Y",###}> / <{$recipeinfo.downloads}> have viewed</p>
                    <div class="fn">
                    	<p class="fo_pic">
                            <a href="#"><img src="../Public/images/tui.jpg" /></a>
                            <a href="#"><img src="../Public/images/face.jpg" /></a>
                        </p>
                        <p class="xx">
                        <for start="0" end="$levelavg">
                            <img src="../Public/images/huang_xx.jpg" />
                        </for>
                            <for start="$levelavg" end="5">
                                <img src="../Public/images/hui_xx.jpg" />
                            </for>
                            <span class="xt">
                                <em>
                                <switch name="levelavg">
                                    <case value="0"><span class="delicious"></span></case>
                                    <case value="1"><span class="delicious">just so so</span></case>
                                    <case value="2"><span class="delicious">worth to try it</span></case>
                                    <case value="3"><span class="delicious">taste yummy</span></case>
                                    <case value="4"><span class="delicious">very delicious</span></case>
                                    <case value="5"><span class="delicious">fantastic</span></case>
                                </switch>
                                </em>
                            </span>
    					<div style="clear:both;"></div>
                    </div>

                    <p class="print">
                        <eq name="Think.session.userrole" value='1'>
                                <span style="position: relative;left:-405px;">
                                    <a href="__APP__/Recipe/edit/sid/<{$recipeinfo.recipetypeid}>/cid/<{$Think.get.cid}>/id/<{$Think.get.id}>">Edit</a>
                                </span>
                                <else/>

                                <notempty name="Think.session.userid">

                                    <eq name="Think.session.userid" value="$recipeinfo.userinfo.id">
                                        <span style="position: relative;left:-405px;">
                                            <a href="__APP__/Recipe/edit/sid/<{$recipeinfo.recipetypeid}>/cid/<{$Think.get.cid}>/id/<{$Think.get.id}>">Edit</a>
                                        </span>
                                    </eq>

                                </notempty>
                        </eq>
                        <span class="em" style="margin-right: 20px;"><a href="javascript:print();;">Print</a></span>
                        <span class="em" style="margin-right: 20px;"><a href="#">Email</a></span>
                        <notempty name="Think.session.username">
                            <span><a id="favo" class="favo" href="__APP__/Recipe/favourite/sid/<{$recipeinfo.recipetypeid}>/cid/<{$Think.get.cid}>/id/<{$Think.get.id}>">Add to My Favourite</a></span>
                        </notempty>
                    </p>
                    <p class="le_p"></p>
                </div>                
                <div style="clear:both;"></div>
            </div>
            
            <div class="pic_top">
            	<div class="ban_left">
                    <div class="banner_01">
                        <DIV id=YNews style="width:312px; height:312px;">
                                <notempty>
                                    <IMG style="width:312px; height:312px;" src="__PUBLIC__/Content/RecipeArticle/Big_<{$recipeinfo.image}>">
                                </notempty>
                        </DIV>
                    </div>

                    <div class="method">
                        <ul>
                            <neq name="recipeinfo.setcookmethod.id" value="1">
                                <empty name="recipeinfo.setcookmethod">
                                        <li><strong>Cook method:</strong><{$recipeinfo.cookmethod}></li>
                                    <else/>
                                        <li><strong>Cook method:</strong><{$recipeinfo.setcookmethod.name}></li>
                                </empty>
                            </neq>

                            <neq name="recipeinfo.setcourse.id" value="1">
                                <empty name="recipeinfo.setcourse">
                                    <li><strong>Course:</strong><{$recipeinfo.course}></li>
                                    <else/>
                                    <li><strong>Course:</strong><{$recipeinfo.setcourse.name}></li>
                                </empty>
                            </neq>

                            <neq name="recipeinfo.setdietaryneeds.id" value="1">
                                <empty name="recipeinfo.setdietaryneeds">
                                    <li><strong>Dietary needs:</strong><{$recipeinfo.dietaryneeds}></li>
                                    <else/>
                                    <li><strong>Dietary needs:</strong><{$recipeinfo.setdietaryneeds.name}></li>
                                </empty>
                            </neq>

                            <neq name="recipeinfo.seteasyhard.id" value="1">
                                <empty name="recipeinfo.seteasyhard">
                                    <li><strong>Easy or hard:</strong><{$recipeinfo.easyorhard}></li>
                                    <else/>
                                    <li><strong>Easy or hard:</strong><{$recipeinfo.seteasyhard.name}></li>
                                </empty>
                            </neq>

                            <neq name="recipeinfo.setservepeople.id" value="1">
                                <empty name="recipeinfo.setservepeople">
                                    <li><strong>Serve people:</strong><{$recipeinfo.servepeople}></li>
                                    <else/>
                                    <li><strong>Serve people:</strong><{$recipeinfo.setservepeople.name}></li>
                                </empty>
                            </neq>

                            <neq name="recipeinfo.settotaltime.id" value="1">
                                <empty name="recipeinfo.settotaltime">
                                    <li><strong>Total time:</strong><{$recipeinfo.totaltime}></li>
                                    <else/>
                                    <li><strong>Total time:</strong><{$recipeinfo.settotaltime.name}></li>
                                </empty>
                            </neq>

                            <neq name="recipeinfo.setoccasion.id" value="1">
                                <empty name="recipeinfo.setoccasion">
                                    <li style="border:none;"><strong>Occasion:</strong><{$recipeinfo.occasion}></li>
                                    <else/>
                                    <li style="border:none;"><strong>Occasion:</strong><{$recipeinfo.setoccasion.name}></li>
                                </empty>
                            </neq>


                        </ul>
                    </div>
                </div>
            
                <div class="ingred_liao">
                    <div class="Main_ingredient">
                        <h2 class="ing_htwo">Main ingredient(s)</h2>
                        <ul class="ing_bor">
                            <volist name="mainsinfo" id="vo">
                                <li><span class="t">
                                    <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.foodimage}>" /></span>
                                    <p><{$vo.foodname}><br /><span title="<{$vo.foodtotal}>g"><{$vo.foodamount}> <{$vo.foodunit}></span></p>
                                </li>
                            </volist>
                            <div style="clear:both;"></div>
                        </ul>
                    </div>

                    <notempty name="recipeinfo.recipeaccessory">
                        <div class="Other_ingredient">
                            <h2 class="ing_htwo">Other ingredient(s)</h2>
                            <ul class="ing_bor">
                                <volist name="accessoryinfo" id="vo">
                                    <li><span class="t">
                                    <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.foodimage}>" /></span>
                                        <p><{$vo.foodname}><br /><span title="<{$vo.foodtotal}>g"><{$vo.foodamount}> <{$vo.foodunit}></span></p>
                                    </li>
                                </volist>
                                <div style="clear:both;"></div>
                            </ul>
                        </div>
                    </notempty>

                    <notempty name="recipeinfo.recipecondiment">
                        <div class="Condiment">
                            <h2 class="ing_htwo">Condiment(s)</h2>
                            <ul class="ing_bor">
                                <volist name="condimentinfo" id="vo">
                                    <li><span class="t">
                                    <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.foodimage}>" /></span>
                                        <p><{$vo.foodname}><br /><span title="<{$vo.foodtotal}>g"><{$vo.foodamount}> <{$vo.foodunit}></span></p>
                                    </li>
                                </volist>
                                <div style="clear:both;"></div>
                            </ul>
                        </div>
                    </notempty>
                </div>
                <div style="clear:both;"></div>
            </div>

            <notempty name="recipeinfo.description">
                <div class="direc">
                    <h2 class="direc_h2">Brief description</h2>
                    <div style="margin-top:5px;white-space:normal; display:block;word-break:break-all;width:692px;">
                        <{$recipeinfo.description}>
                    </div>
                </div>
            </notempty>

            <div class="direc">
                <h2 class="direc_h2">Directions</h2>
                <div style="margin-top:5px;white-space:normal; display:block;word-break:break-all;width:692px;">
                    <{$recipeinfo.details}>
                </div>
            </div>

            <notempty name="recipeinfo.technique">
                <div class="direc">
                    <h2 class="direc_h2">Tips</h2>
                    <div style="margin-top:5px;white-space:normal; display:block;word-break:break-all;width:692px;">
                        <{$recipeinfo.technique}>
                    </div>
                </div>
            </notempty>

            <div class="rate">
            	<h2 class="all_h2">All the Rate & Comments</h2>
                <empty name="commentsinfo">
                        None
                    <else/>
                    <volist name="commentsinfo" id="vo">
                        <div class="rate_text">
                            <p class="p_01"><span class="ren"><{$vo.username|ucfirst}></span>
                                <for start="0" end="$vo.onlevel">
                                    <img src="../Public/images/all_xx.jpg" />
                                </for>
                            <span class="xt"><em>
                                <switch name="vo.onlevel">
                                    <case value="0">not good</case>
                                    <case value="1">just so so</case>
                                    <case value="2">worth to try it</case>
                                    <case value="3">taste yummy</case>
                                    <case value="4">very delicious</case>
                                    <case value="5">fantastic</case>
                                </switch>
                            </em>


                <eq name="Think.session.userrole" value='1'>
                        <a style="float: right;" href="__APP__/Recipe/deletecomments/cid/<{$recipeinfo['recipecategoryid']}>/aid/<{$recipeinfo['id']}>/sid/<{$vo['id']}>">delete</a>
                    <else/>
                        <notempty name="Think.session.userid">
                            <eq name="Think.session.userid" value="$recipeinfo.userinfo.id">
                                <a style="float: right;" href="__APP__/Recipe/deletecomments/cid/<{$recipeinfo['recipecategoryid']}>/aid/<{$recipeinfo['id']}>/sid/<{$vo['id']}>">delete</a>
                            </eq>
                        </notempty>
                </eq>
                                    </span>
                            </p>
                            <p class="posted">Posted:<{$vo.created|date="m-d-Y",###}></p>
                            <p style="white-space:normal; display:block;word-break:break-all;"><{$vo.content}></p>
                        </div>
                    </volist>


                    <div style="clear:both;"></div>
                    <div class="fanye_box">
                        <div class="fanye_text">
                            <{$fpage}>
                        </div>
                        <div></div>
                        <div style="clear:both;"></div>
                    </div>
                </empty>

            </div>
            
            <div class="comment">
            	<h2><span>
                    <empty name="Think.session.username">
                            anonymous
                        <else/>
                            <{$Think.session.username}>
                    </empty>

                </span>Rate and Comment</h2>
                <div class="my">
                	<p class="rating"><span class="my_rating">My Rating:</span>
                        <a href="javascript:;"><img class="onstart" title="just so so" src="../Public/images/rating_x.jpg" /></a>
                        <a href="javascript:;"><img class="onstart" title="worth to try it" src="../Public/images/rating_x.jpg" /></a>
                        <a href="javascript:;"><img class="onstart" title="taste yummy" src="../Public/images/rating_x.jpg" /></a>
                        <a href="javascript:;"><img class="onstart" title="very delicious" src="../Public/images/rating_x.jpg" /></a>
                        <a href="javascript:;"><img class="onstart" title="fantastic" src="../Public/images/rating_x.jpg" /></a>
                        <em>Click to  finish your rating</em>
                    </p>
                    <div style="clear:both;"></div>
                    <form action="__APP__/Recipe/Comments" method="post" id="comments">
                        <input type="hidden" name="categoryid" value="<{$recipeinfo.recipecategoryid}>" />
                        <input type="hidden" name="articleid" value="<{$recipeinfo.id}>" />
                        <input type="hidden" name="username" value="<{$Think.session.username}>" />
                        <p class="My_Comment"><span class="my_rating">My Comment:</span> <span class="kuang_da">
                            <textarea name="content"></textarea>
                        </span></p>
                        <p class="remain">500 characters remain</p>
                        <input type="hidden" id="onlevel" name="onlevel" value="0" />
                        <p class="message-board-03"><input type="submit" value="post" id="button_01" /></p>
                        <empty name="Think.session.username">
                            <p class="message-board-04">
                                <input id="codes" name="code" type="text" style="width:70px;height:25px;position: relative;bottom: 6px;" />
                                <img id="clickcode" src="__APP__/Public/verify" />
                            </p>
                        </empty>

                    </form>
                    <div style="clear:both;"></div>
                </div>
            </div>
            
        </div>
        
        <div class="right">
        	<div class="infk">
            	<h2>Nutritional Info </h2>
                <div class="info_ul">
                    <p class="hui">Amount Per Sevring</p>
                    <p class="calo">Calories: <{$recipenutritionsinfo.calories}> g</p>
                    <ul>
                        <li>Total Fat: <{$recipenutritionsinfo.total-fat|default="0"}> g</li>
                        <li>Saturated Fat: <{$recipenutritionsinfo.saturated-fat|default="0"}> g</li>
                        <li>Cholesterol: <{$recipenutritionsinfo.cholesterol|default="0"}> mg</li>
                        <li>Sodium: <{$recipenutritionsinfo.sodium|default="0"}> mg</li>
                        <li>Potassium: <{$recipenutritionsinfo.potassium|default="0"}> mg</li>
                        <li>Total Carbohydrate: <{$recipenutritionsinfo.total-carbohydrate|default="0"}> mg</li>
                        <li>Dietary Fiber: <{$recipenutritionsinfo.dietary-fiber|default="0"}> g</li>
                        <li>Sugars: <{$recipenutritionsinfo.sugars|default="0"}> g</li>
                        <li>Protein: <{$recipenutritionsinfo.protein|default="0"}> g</li>
                        <li>Vitamin A: <{$recipenutritionsinfo.vitamin-a|default="0"}> %</li>
                        <li>Vitamin B-12: <{$recipenutritionsinfo.itamin-b-12|default="0"}> %</li>
                        <li>Vitamin B-6: <{$recipenutritionsinfo.vitamin-b-6|default="0"}> %</li>
                        <li>Vitamin C: <{$recipenutritionsinfo.vitamin-c|default="0"}> %</li>
                        <li>Vitamin D: <{$recipenutritionsinfo.vitamin-d|default="0"}> %</li>
                        <li>Vitamin E: <{$recipenutritionsinfo.vitamin-e|default="0"}> %</li>
                        <li>Calcium: <{$recipenutritionsinfo.calcium|default="0"}> %</li>
                        <li>Copper: <{$recipenutritionsinfo.copper|default="0"}> %</li>
                        <li>Folate: <{$recipenutritionsinfo.folate|default="0"}> %</li>
                        <li>Iron: <{$recipenutritionsinfo.iron|default="0"}> %</li>
                        <li>Magnesium: <{$recipenutritionsinfo.magnesium|default="0"}> %</li>
                        <li>Manganese: <{$recipenutritionsinfo.manganese|default="0"}> %</li>
                        <li>Niacin: <{$recipenutritionsinfo.niacin|default="0"}> %</li>
                        <li>Pantothenic Acid: <{$recipenutritionsinfo.pantothenic-acid|default="0"}> %</li>
                        <li>Phosphorus: <{$recipenutritionsinfo.phosphorus|default="0"}> %</li>
                        <li>Riboflavin: <{$recipenutritionsinfo.riboflavin|default="0"}> %</li>
                        <li>Selenium: <{$recipenutritionsinfo.selenium|default="0"}> %</li>
                        <li>Thiamin: <{$recipenutritionsinfo.thiamin|default="0"}> %</li>
                        <li>Zinc: <{$recipenutritionsinfo.zinc|default="0"}> %</li>
                    </ul>
                    <p class="percent">Percent Daily Values are based on a 2,000 calorie diet. Your daily values may be higher or lower depending on your calorie needs.</p>
                </div>
            </div>
            
       		<div class="make">
            	<h2>you may also like</h2>
                <ul>
                	<li><a href="#"><img src="../Public/images/make_01.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <li><a href="#"><img src="../Public/images/make_02.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <li><a href="#"><img src="../Public/images/make_03.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <li><a href="#"><img src="../Public/images/make_04.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <li><a href="#"><img src="../Public/images/make_05.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <li><a href="#"><img src="../Public/images/make_06.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <li><a href="#"><img src="../Public/images/make_07.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <li><a href="#"><img src="../Public/images/make_08.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <li><a href="#"><img src="../Public/images/make_09.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <div style="clear:both;"></div>
                </ul>
            </div>       
        </div>
    </div>
